<template>
    <!-- <ul> -->
    <div v-for="route in routes" :key="route.path" class="top_menu_item">
        <router-link :to="route.path">{{ route.name }}</router-link>
        <top-menu v-if="route.children" :routes="route.children" />
    </div>
    <!-- </ul> -->
</template>

<script>
export default {
    name: 'TopMenu',
    props: {
        routes: Array
    },
    mounted() {
        console.log(this.routes)
    }
}
</script>
<style lang="css" scoped>
.top_menu_item {
    margin: 10px;
}
</style>